package com.w2cx.selenium.page;

import com.w2cx.selenium.base.DriverBase;
import com.w2cx.selenium.util.Locator;
import org.openqa.selenium.WebElement;

import java.util.List;

public class ColdBootManagePage extends BasePage {

    public ColdBootManagePage(DriverBase driver){
        super(driver);
    }

    //获取运营管理菜单
    public WebElement getOperateManageMenu(){
        //return this.getOperateManageMenu();
        List<WebElement> list = elements(Locator.getByLocator("firstMenuList"));
        WebElement element = list.get(5);
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取“冷启动管理”菜单
    public WebElement getColdBootManageMenu(){
        WebElement element = element(Locator.getByLocator("coldBootManageMenu"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取“内容管理”链接
    public WebElement getContentManageLink(){
        WebElement element = element(Locator.getByLocator("contentManageLink"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取“选择内容”按钮
    public WebElement getSelectContentBtn(){
        WebElement element = element(Locator.getByLocator("selectContentBtn"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //选中内容ID
    public WebElement getSelectedContentID(){
        WebElement element = element(Locator.getByLocator("selectedContentID"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取“选择”复选框
    public WebElement getSelectContentCheckBox(){
        WebElement element = element(Locator.getByLocator("firstCheckBox"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取“关闭”按钮
    public WebElement getCloseBtn(){
        WebElement element = element(Locator.getByLocator("closeBtn"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取内容id
    public WebElement getFirstContentID(){
        WebElement element = element(Locator.getByLocator("firstContentID"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取删除按钮
    public WebElement getDelBtn(){
        WebElement element = element(Locator.getByLocator("firstContentDelLink"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取删除-确定按钮
    public WebElement getDelConfirmBtn(){
        WebElement element = element(Locator.getByLocator("contentDelConfirmBtn"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


}
